<?php

class Application_Model_DbTable_Contrato extends Zend_Db_Table_Abstract
{

    protected $_name = 'contrato';

    public function getContrato($numero_contrato, $mes)
    {
        $select = $this->select();
        $select->from($this, array('count(*) as amount'))->where('contrato ='.$numero_contrato." and mes_referencia = '".$mes."'");
        $rows = $this->fetchAll($select);

        return($rows[0]->amount);
    }

}

